package com.szh.zx.gaoDingJavaBook.chapter8.three;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;

/**
*  测试：list比对两个对象是否相等，是通过equals方法进行比较，
* */
class A2{
	@Override
	public boolean equals(Object obj) {
		return true;
	}
}
public class ListTest2 {
	public static void main(String[] args) {
		Collection books1 = new HashSet();
		books1.add("轻量级javaee企业级应用实战");
		books1.add("疯狂java讲义");
		books1.add("疯狂android讲义");
		System.out.println(books1);
		books1.remove(new A2());
		System.out.println(books1);
		books1.remove(new A2());
		System.out.println(books1);
	}
}
